const express = require('express')
const app = express()
const qs = require('querystring')
const mw=function(req,res,next){
    let  str=''
    req.on('data',(chunk)=>{
        str+=chunk;
    })
    req.on('end',()=>{
        const body= qs.parse(str)
        req.body=body
        next( )
    })
    console.log('中间件函数')
    next()
}
const mw2=function(req,res,next){
    console.log(' 第二个中间件函数')
    next()
}

app.listen(80,()=>{
    console.log('http://127.0.0.1')
})